package com.shwread.android.qysw.activity;

import android.os.Bundle;
import android.os.Handler;
import android.os.Message;

import com.shwread.android.ui.page.ECommercePage;
import com.tgx.tina.android.ipc.framework.IUIPage;


public class ECommerceActivity extends MainActivity {

    private Handler myhandler = new Handler() {

        @Override
        public void handleMessage(Message msg) {
            if (curPage != null) curPage.notifyView(msg.what, msg.getData());

        }

    };

    @Override
    public Handler getUIHandler() {
        return myhandler;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        changePage(new ECommercePage(this), IUIPage.KEEP_LAST_STATUS);

    }

    @Override
    protected void onResume() {
        super.onResume();
    }



    @Override
    protected void onDestroy() {
        super.onDestroy();
    }


    @Override
    public void onBackPressed() {
        if (curPage != null && curPage.handleBack()) {
            return;
        }
        if (history.isEmpty()) {
            finish();
        }
        onBackPressed0();
    }

}
